
#ifndef __PEACE_OF_MIND__
#define __PEACE_OF_MIND__

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define SEND_SMS_URL "https://xxxxxx.appspot.com/send_sms"
#define SET_GLOBAL_CONFIG_URL "https://xxxxxx.appspot.com/set_config"
#define GET_GLOBAL_CONFIG_URL "https://vahoaka-malagasy.appspot.com/eve"

namespace pendina
{
	namespace secure
	{
		struct MemoryStruct {
			char *memory;
			size_t size;
		};
		class peace_of_mind
		{
		private:
			struct MemoryStruct chunk;

		public:
			 void infos() { if(chunk.memory) printf("%s\n", chunk.memory); }
			 void send_sms(char *phone, char *msg) { 
				 post_file_content(SEND_SMS_URL, phone, msg); 
			 }

			 peace_of_mind() { chunk.memory = 0; }
			~peace_of_mind() { }

			int fetch_url_content(char *rurl);
			int post_file_content(char *rurl, char *phone, char *msg);
		};
	}
}

#endif
